package com.ehotting.eaf.core.domain.system.api;

import com.ehotting.eaf.core.annotation.Excel;
import com.ehotting.eaf.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * C端用户许可证日志对象 user_license_log
 * 
 * @author edsta
 * @date 2023-03-31
 */
public class UserLicenseLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long licenseId;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long userId;

    /**
     * 用户账号
     */
    private String username;

    /** 许可证类型，目前分为 [1：企业使用:2，企业试用:3，个人使用：4、个人试用] 四类 */
    @Excel(name = "许可证类型，目前分为 [1：企业使用:2，企业试用:3，个人使用：4、个人试用] 四类")
    private String licenseType;

    /** $column.columnComment */
    @Excel(name = "许可证类型，目前分为 [1：企业使用:2，企业试用:3，个人使用：4、个人试用] 四类")
    private String appName;

    /** $column.columnComment */
    @Excel(name = "许可证类型，目前分为 [1：企业使用:2，企业试用:3，个人使用：4、个人试用] 四类")
    private String appVersion;

    /** JOSN字符串，mcBoard=主板系列号，mcCpu=处理器系统号 */
    @Excel(name = "JOSN字符串，mcBoard=主板系列号，mcCpu=处理器系统号")
    private String machineCode;

    /** 功能名称，区分业务类型和范围（填空默认所有功能，多个功能逗号分开） */
    @Excel(name = "功能名称，区分业务类型和范围", readConverterExp = "填=空默认所有功能，多个功能逗号分开")
    private String featureName;

    /** $column.columnComment */
    @Excel(name = "功能名称，区分业务类型和范围", readConverterExp = "$column.readConverterExp()")
    private Date generatedDate;

    /** $column.columnComment */
    @Excel(name = "功能名称，区分业务类型和范围", readConverterExp = "$column.readConverterExp()")
    private Date expireDate;

    /** 授权，1表示授权，0表示表示未授权 */
    @Excel(name = "授权，1表示授权，0表示表示未授权")
    private Integer isAuthenticated;

    /** $column.columnComment */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "授权，1表示授权，0表示表示未授权", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /** 功能名称，区分业务类型和范围（填空默认所有功能，多个功能逗号分开） */
    @Excel(name = "主要填写未授权原因", readConverterExp = "$column.readConverterExp()")
    private String note;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setLicenseId(Long licenseId) 
    {
        this.licenseId = licenseId;
    }

    public Long getLicenseId() 
    {
        return licenseId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setLicenseType(String licenseType)
    {
        this.licenseType = licenseType;
    }

    public String getLicenseType() 
    {
        return licenseType;
    }
    public void setAppName(String appName) 
    {
        this.appName = appName;
    }

    public String getAppName() 
    {
        return appName;
    }
    public void setAppVersion(String appVersion) 
    {
        this.appVersion = appVersion;
    }

    public String getAppVersion() 
    {
        return appVersion;
    }
    public void setMachineCode(String machineCode) 
    {
        this.machineCode = machineCode;
    }

    public String getMachineCode() 
    {
        return machineCode;
    }
    public void setFeatureName(String featureName) 
    {
        this.featureName = featureName;
    }

    public String getFeatureName() 
    {
        return featureName;
    }
    public void setGeneratedDate(Date generatedDate) 
    {
        this.generatedDate = generatedDate;
    }

    public Date getGeneratedDate() 
    {
        return generatedDate;
    }
    public void setExpireDate(Date expireDate) 
    {
        this.expireDate = expireDate;
    }

    public Date getExpireDate() 
    {
        return expireDate;
    }
    public void setIsAuthenticated(Integer isAuthenticated) 
    {
        this.isAuthenticated = isAuthenticated;
    }

    public Integer getIsAuthenticated() 
    {
        return isAuthenticated;
    }
    public void setApplyTime(Date applyTime) 
    {
        this.applyTime = applyTime;
    }

    public Date getApplyTime() 
    {
        return applyTime;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("licenseId", getLicenseId())
            .append("userId", getUserId())
            .append("licenseType", getLicenseType())
            .append("appName", getAppName())
            .append("appVersion", getAppVersion())
            .append("machineCode", getMachineCode())
            .append("featureName", getFeatureName())
            .append("generatedDate", getGeneratedDate())
            .append("expireDate", getExpireDate())
            .append("isAuthenticated", getIsAuthenticated())
            .append("applyTime", getApplyTime())
            .toString();
    }
}
